<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<c:set var="path" value="${pageContext.request.contextPath }" />
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link rel="shortcut icon" href="${path }/resource/images/favicon.ico">
<!--[if lt IE 9]>
<script type="text/javascript" src="${path }/resource/plugin/hui/lib/html5.js"></script>
<script type="text/javascript" src="${path }/resource/plugin/hui/lib/respond.min.js"></script>
<script type="text/javascript" src="${path }/resource/plugin/hui/lib/PIE_IE678.js"></script>
<![endif]-->


<!-- 本框架基本脚本和样式 -->
<script type="text/javascript"
	src="${path }/resource/js/jquery-2.1.4.min.js"></script>
<script type="text/javascript"
	src="${path }/resource/js/systools/EXBase.js"></script>
<!--[if IE 6]>
<script type="text/javascript" src="http://lib.h-ui.net/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->

<link rel="stylesheet" type="text/css"
	href="${path }/resource/css/visitor/main.css">
<link rel="stylesheet" type="text/css"
	href="${path }/resource/css/visitor/ejym.css">
<link rel="stylesheet" type="text/css"
	href="${path }/resource/plugin/slideBox/jquery.slideBox.css">
<script type="text/javascript"
	src="${path }/resource/plugin/slideBox/jquery.slideBox.js"></script>

<script type="text/javascript"
	src="${path }/resource/plugin/hui/lib/jquery.SuperSlide.2.1.1.js"></script>


<meta name="keywords" content="${webKeyWord}">
<meta name="description" content="${webDescription}" />
<title>联系我们-${webTitle}</title>
</head>
<body>

	<!--导航栏-->
	<jsp:include page="_nav.jsp"></jsp:include>
	<div class="banner0 banner6">
	</div>

	<div class="center_box">
		<div class="center_left">
			<div class="left_title">
				<img src="${path }/resource/images/06.png">
				<ul class="list">
					<li><a href="${path }/visitor/connect"> <b>-</b>
							联系热线
					</a></li>
					<li class="list_current"><a href="${path }/visitor/message">
							<b>-</b> 在线留言
					</a></li>
				</ul>


			</div>
		</div>
		<div class="center_right">
			<div class="r_c_t">
				<div class="r_t">在线留言</div>
				<div class="r_mbx">
					<b class="c-red"> </b> 您现在位置：<a href="#">首页</a> > <a
						href="${path }/visitor/message">联系我们</a> > 在线留言
				</div>
			</div>
			<div class="r_c_c">
			
			<c:if test="${msg eq null }">
			<form id="" action="${path }/visitor/addMessage" method="post"
					class="form form-horizontal">

					<div class="row cl">
						<label class="form-label  col-sm-3">留言类型：</label>
						<div class="formControls  col-sm-5">
							<select class="select"name="type">
								<option value="1">业务咨询</option>
								<option value="2">投诉建议</option>
							</select>
						</div>
					</div>
					<div class="row cl">
						<label class="form-label  col-sm-3">留 言 人 ：</label>
						<div class="formControls  col-sm-5">
							<input type="text" class="input-text" name="user">
						</div>
					</div>
					<div class="row cl">
						<label class="form-label  col-sm-3">联系电话：</label>
						<div class="formControls  col-sm-5">
							<input type="text" class="input-text" name="tel">
						</div>
					</div>

					<div class="row cl">
						<label class="form-label  col-sm-3">联系地址：</label>
						<div class="formControls  col-sm-5">
							<input type="text" class="input-text" name="address">
						</div>
					</div>
					<div class="row cl">
						<label class="form-label  col-sm-3">留言内容：</label>
						<div class="formControls  col-sm-5">
							<textarea id="msgContent" class="textarea" name="content"></textarea>
						</div>
					</div>
					<div class="row cl">
						<div class=" col-sm-5 col-xs-offset-4 col-sm-offset-3">
							<input onclick="return check()" class="btn btn-primary radius"
								type="submit" value="提交">
						</div>
					</div>
				</form>
			</c:if>
			<c:if test="${msg ne null }">
				<img alt="" src="${path }/resource/images/ok.png">　<span class="f-18">${msg }</span>
			</c:if>
				

			</div>

		</div>
	</div>


	<!--网站底部-->
	<jsp:include page="_foot.jsp"></jsp:include>

	<script type="text/javascript">
		/***
		 * 验证表单是否为空
		 */
		function check() {
			var flag = true;
			var input = $(".messageTable").find("input[type=text]");
			input.each(function() {
				if ($(this).val().trim() == "") {
					flag = false;

				}
			});

			if ($("#msgContent").val().trim() == "") {
				flag = false;
			}

			if (!flag) {
				alert("请填写完整的留言信息后在提交！");
			}
			return flag;
		}
	</script>
</body>
</html>
